<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>Test Index2</title>
        <%= stylesheet_link_tag "../javascripts/ext/resources/css/ext-all.css" %>
        <%= javascript_include_tag "ext/adapter/prototype/prototype.js" %>
        <%= javascript_include_tag "ext/adapter/prototype/scriptaculous.js" %>
        <%= javascript_include_tag "ext/adapter/prototype/effects.js" %>
        <%= javascript_include_tag "ext/adapter/prototype/ext-prototype-adapter.js" %>
        <%= javascript_include_tag "ext/ext-all-debug.js" %>
        <%= javascript_include_tag "ext/build/locale/ext-lang-zh_CN.js" %>
    </head>
    <body>
        <div id="container">
            <div id="toolbar">
            </div>
        </div>
        <script>
            Ext.onReady(function(){
                Ext.QuickTips.init();
                
                // turn on validation errors beside the field globally
                Ext.form.Field.prototype.msgTarget = 'side';
                var arr = [[1, '小王'], [2, '小林'], [3, '张三']];
                var reader = new Ext.data.ArrayReader({
                    id: 0
                }, [{
                    name: 'value'
                }, {
                    name: 'key'
                }]);
                
                var store = new Ext.data.Store({
                    reader: reader
                });
                store.loadData(arr);
                var oplist4 = new Ext.form.FieldSet({
                    title: '序号位数',
                    autoHeight: true,
                    width: 260,
                    layout: 'table', //这个让radio横着放   
                    items: [{
                        xtype: 'radio',
                        name: 'xh',
                        boxLabel: '一位',
                        id: 'radioxh1'
                    }, {
                        xtype: 'radio',
                        name: 'xh',
                        boxLabel: '两位',
                        id: 'radioxh2'
                    }, {
                        xtype: 'radio',
                        name: 'xh',
                        boxLabel: '三位',
                        id: 'radioxh3'
                    }]
                });
                var combobox = new Ext.form.ComboBox({ //combobox   
                    fieldLabel: 'ComboBox',
                    resiable: true,
                    handleHeight: 100, //   
                    displayField: 'key',
                    mode: 'local',
                    store: store //数据储存到这个comboBox   
                });
                
                var top = new Ext.FormPanel({
                    labelAlign: 'top',
                    frame: true,
                    title: '来电信息',
                    bodyStyle: 'padding:5px 5px 0',
                    width: 600,
                    items: [{
                        layout: 'column',
                        items: [{
                            columnWidth: .33,
                            layout: 'form',
                            items: [{
                                xtype: 'textfield',
                                fieldLabel: '来电号码',
                                name: 'first',
                                anchor: '95%'
                            }, {
                                xtype: 'textfield',
                                fieldLabel: '客户名称',
                                name: 'company',
                                anchor: '95%'
                            }, {
                                xtype: 'textfield',
                                fieldLabel: '客户类型',
                                name: 'company',
                                anchor: '95%'
                            }]
                        }, {
                            columnWidth: .33,
                            layout: 'form',
                            items: [{
                                xtype: 'textfield',
                                fieldLabel: '联系电话',
                                name: 'last',
                                anchor: '95%'
                            }, {
                                xtype: 'textfield',
                                fieldLabel: '称呼',
                                name: 'email',
                                vtype: 'email',
                                anchor: '95%'
                            }, {
                                xtype: 'textfield',
                                fieldLabel: '结算类型',
                                name: 'company',
                                anchor: '95%'
                            }]
                        }, {
                            columnWidth: .33,
                            layout: 'form',
                            items: [{
                                xtype: 'textfield',
                                fieldLabel: '会员卡号',
                                name: 'last',
                                anchor: '95%'
                            }, {
                                xtype: 'textfield',
                                fieldLabel: '联系人',
                                name: 'email',
                                vtype: 'email',
                                anchor: '95%'
                            }, {
                                xtype: 'textfield',
                                fieldLabel: '结算类型',
                                name: 'company',
                                anchor: '95%'
                            }]
                        }]
                    }, {
                        xtype: 'textfield',
                        fieldLabel: '联系地址',
                        name: 'email',
                        vtype: 'email',
                        anchor: '88.5%'
                    }, {
                        xtype: 'textfield',
                        fieldLabel: '来电记录',
                        name: 'email',
                        vtype: 'email',
                        anchor: '88.5%'
                    }, oplist4, combobox],
                    
                    buttons: [{
                        text: 'Save'
                    }, {
                        text: 'Cancel'
                    }]
                });
                top.render(document.body);
            });
        </script>
        <form id="form1" class="x-form">
            <input type="text" size=20 name="Test"/>
            <div class="x-form-item">
                //日期表单元素 
                <label for="markup-date">
                    Date:
                </label>
                <div class="x-form-element">
                    <input type="text" size="20" name="required" id="required"/>
                </div>
            </div>
            <div class="x-form-item">
                //日期表单元素 
                <label for="markup-date">
                    Date:
                </label>
                <div id="ext-gen138" class="x-combo-list-inner" style="overflow: auto; width: 162px; height: 60px;">
                    <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
                        <option>item1</option>
                        <option>item2</option>
                        <option>item3</option>
                    </select>
                </div>
            </div>
            <div class="x-form-item">
                //表单内部元素 
                <label for="combo-local">
                    Local Data:
                </label>
                //标题 
                <div class="x-form-element">
                    //表单元素样式 <input type="text" size="20" name="combo-local" id="combo-local"/>
                </div>
            </div>
        </form>
        <div style="border: 1px solid rgb(255, 204, 102); padding: 4px; background-color: rgb(255, 255, 186); margin-bottom: 10px; text-align: center;">
            你的圈子自从上次访问以后有新的内容
        </div>
    </body>
</html>
